﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Fierce.Entity.Basic;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Fierce.Core.Configuration.Basic
{
    internal partial class BasicRoleMenuFunctionConfiguration : EntityConfigurationBase<BasicRoleMenuFunction>
    {
        internal override void MapperInitialization(EntityTypeBuilder<BasicRoleMenuFunction> builder)
        {
            builder.HasOne(m => m.BasicRole).WithMany().HasForeignKey(m => m.RoleID);
            builder.HasOne(m => m.BasicMenuFunction).WithMany().HasForeignKey(m => m.MenuFunctionID);
        }
    }
}
